package com.charm.restaurant.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.charm.restaurant.common.Result;
import com.charm.restaurant.entity.Purchase;

import java.util.List;

/**
 * 采购服务接口
 */
public interface PurchaseService extends IService<Purchase> {
    
    /**
     * 新增采购单
     */
    Result<Purchase> savePurchase(Purchase purchase);
    
    /**
     * 分页查询采购单
     */
    Result<Page<Purchase>> pagePurchase(int page, int pageSize, String name);
    
    /**
     * 根据ID查询采购单
     */
    Result<Purchase> getPurchaseById(Long id);
    
    /**
     * 修改采购单
     */
    Result<Purchase> updatePurchase(Purchase purchase);
    
    /**
     * 删除采购单
     */
    Result<String> deletePurchase(List<Long> ids);
    
    /**
     * 更新采购单状态
     */
    Result<String> updateStatus(Long id, Integer status);
    
    /**
     * 入库处理（采购完成）
     */
    Result<String> inStock(Long id);
} 